/**
 * Copyright (c) 2016-2019 人人开源 All rights reserved.
 *
 * https://www.renren.io
 *
 * 版权所有，侵权必究！
 */

package com.theme.passport.controller.job.task;

import com.theme.passport.service.UserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * [用户VIP过期检查定时任务]-(每天0点后执行)-(0 0 0 * * ? *)
 *
 * userVipExpirationCheckTask为spring bean的名称
 *
 * @author Mark sunlightcs@gmail.com
 */
@Component("userVipExpirationCheckTask")
public class UserVipExpirationCheckTask implements ITask {
	private Logger logger = LoggerFactory.getLogger(getClass());

	@Autowired
	private UserService userService;

	@Override
	public void run(String params){
		logger.debug("UserVipExpirationCheckTask [用户VIP过期检测] 定时任务正在执行，参数为：{}", params);

		userService.VipExpirationCheck();

	}
}
